/* 
 * File:   Symbol.cpp
 * Author: itu
 * 
 * Created on November 26, 2011, 8:58 PM
 */

#include "Symbol.h"

Symbol::Symbol(string id) {
    identifier = id;
    //cout<<"Symbol "<<identifier<<" created."<<endl;
    firstSetAlreadyCalculated=false;
}

string Symbol::getIdentifier() {
    return identifier;
}

vector<Symbol*> Symbol::getFirstSet() {
    if(!firstSetAlreadyCalculated)
        findFirst();
    return firstSet;  
}

void Symbol::printFirstSet() {
    //cout<< "Set size: "<<firstSet.size() << endl;
    for(int i=0; i<firstSet.size(); i++){
        cout << firstSet[i]->getIdentifier() << " ";
    }
    cout<<endl;
}
